package com.chengqs.rapid.common.metric;

/**
 * <B>主类名称：</B>MetricException<BR>
 * <B>概要说明：</B>enter<BR>
 *
 * @author: chengqs
 * @create: 2025-03-18 16:34:23
 **/
public class MetricException extends Throwable {
    private static final long serialVersionUID = 4047603330589432718L;

    private Integer code;

    public MetricException(String err){
        super(err);
    }

    public MetricException(String err, Throwable e){
        super(err,e);
    }

    public MetricException(MetricCodeEnum metricCodeEnum, Throwable cause) {
        super(metricCodeEnum.getMsg(), cause);
        this.code = metricCodeEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
